<div class="gallery-list">
  <input type="hidden" class="action-pagedata" value="{total:<{$total}>, pagecurrent:<{$page|default:1}>, pagetotal:<{$pagetotal}>}">
  <ul>
    <{foreach from=$goodsData key=key item=goods}>
      <li class="goods-item clearfix">
      <div class="goods-pic">

      <{if $goods.products.promotion_type_name }>

        <a <{if $opentype eq 'new_page'}>target="_blank"<{/if}>  href="<{link app=starbuy ctl=site_team act=index arg0=$goods.products.product_id arg1=$goods.products.promotion_type_id}>"><img class="action-goods-img" data-src="<{$goods.image_default_id|default:$imageDefault.S.default_image|storager:'s'}>" alt="<{$goods.name|strip_tags}>"></a>
      <{else}>
        <a <{if $opentype eq 'new_page'}>target="_blank"<{/if}>  href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><img class="action-goods-img" data-src="<{$goods.image_default_id|default:$imageDefault.S.default_image|storager:'s'}>" alt="<{$goods.name|strip_tags}>"></a>
          <{/if}>
      <{if $goods.tags && $gallery_display_tag_goods == 'true'}>
        <{foreach from=$goods.tags item=tags}>
          <{if $tags.params.tag_showOnIndex == 'on'}>
            <{if $tags.params.tag_image}>
              <span class="img-tag-<{$tags.params.pic_loc}>" style="opacity:<{$tags.params.tag_opacity / 100}>;filter:alpha(opacity=<{$tags.params.tag_opacity}>)"><img src="<{$tags.params.tag_image|storager}>"></span>
            <{else}>
      <!-- <span class="text-tag-<{$tags.params.pic_loc}>" style="background-color:<{$tags.tag_bgcolor|default:'transparent'}>;color:<{$tags.tag_fgcolor}>;opacity:<{$tags.params.tag_opacity / 100}>;filter:alpha(opacity=<{$tags.params.tag_opacity}>)"><{$tags.tag_name}></span>
      -->
            <{/if}>
          <{/if}>
        <{/foreach}>
      <{/if}>
    </div>
    <div class="goods-action">
      <!--预售商品的显示判断-->
      <{if !isset($goods.prepare)}>
        <div class="goods-buy">
          <{if $goods.products.store > 0}>
          <!-- 加入购物车 -->
          <{if $env.conf.b2c.gallery.display.buynum == 'true'}>
           
                      
          <span class="p-quantity">
                  <a href="javascript:void(0);" class="btn-decrease">-</a><input type="text" 
            min="<{if $peradd.isused==1}><{$peradd.pernum}><{else}><{if $goods.per_add}><{$goods.per_add}><{else}>1<{/if}><{/if}>"
             max="<{$goods.products.store|number}>" 
             size="2" name="goods[num]" class="action-quantity-input" 
             value="<{if $peradd.isused==1}><{$peradd.pernum}><{else}><{if $goods.per_add}><{$goods.per_add}><{else}>1<{/if}><{/if}>"><a href="javascript:void(0);" class="btn-increase">+</a>
             <input type="hidden"  class="action-quantity-input-getPeradd"  value="<{if $goods.per_add}><{$goods.per_add}><{else}>1<{/if}>">
          <input type="hidden"  class="action-quantity-input-havegift"  value="<{$goods.products.gift}>">
          <input type="hidden"  class="action-quantity-input-getmaxbuy"  value="<{if $goods.products.gift =='havegift'}><{$goods.products.maxbuy|number}><{else}>0<{/if}>">
			

          </span>
            <{if $env.conf.b2c.gallery.display.store_status == 'true'}>
            <{if $goods.products.store <= $env.conf.b2c.gallery.store_status.num}>
            <span class="store-warn"><{t}>库存紧张<{/t}></span>
            <{/if}>
            <{/if}>
          <input type="hidden" name="goods[goods_id]" value="<{$goods.goods_id}>">
          <input type="hidden" name="goods[product_id]" value="<{$goods.products.product_id}>">
          <{/if}>
          <{if $env.conf.b2c.site.buy.target == '2'}>
          <{assign var='buytarget' value='_blank_cart'}>
          <{elseif $env.conf.b2c.site.buy.target == '3'}>
          <{assign var='buytarget' value='_dialog_minicart'}>
          <{/if}>
          <a class="btn btn-major action-addtocart" href="<{link app=b2c ctl=site_cart act=add arg0=goods arg1=$goods.goods_id arg2=$goods.products.product_id arg3=1}>"<{if $buytarget}> target="<{$buytarget}>"<{/if}>><span><span>加入购物车</span></span></a>
          <{elseif $goods.spec_desc && $goods.store}>
          <a class="btn btn-caution" href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><span><span>查看详情</span></span></a>
          <{else}>
          <!-- 到货通知 -->
          <a href="javascript:void(0);" class="btn btn-caution action-notify" rel="<{$goods.goods_id}>::<{$goods.products.product_id}>"><span><span>商品缺货中</span></span></a>
          <{/if}>
        </div>
      <{else}>
      <!--预售商品-->
        <div class="goods-buy">

          <!-- 加入购物车 -->
          <span class="p-quantity">
            <input type="text" min="1" readonly="true" max="<{$goods.products.store|number}>" size="2" name="goods[num]" class="action-quantity-input" value="1">

          </span>
          <input type="hidden" name="goods[goods_id]" value="<{$goods.goods_id}>">
          <input type="hidden" name="goods[product_id]" value="<{$goods.products.product_id}>">


          <a class="btn btn-major"  href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><span><span>立即预定</span></span></a>

        </div>
      <{/if}>

      <div class="goods-others">
        <{if $login=='nologin'}>
        <!-- 用户没有登陆 -->
          <a href="<{link app=b2c ctl=site_passport act=login}>" class="btn btn-simple"><span><span>收藏</span></span></a>
        <{else}>
        <!-- 用户已经登陆 -->
          <{if !$goods.is_fav}>
            <button type="button" class="btn btn-simple" rel="_favbtn_" data-gid="<{$goods.goods_id}>"><span><span>收藏</span></span></button>
            <button type="button" class="btn btn-plane" rev="_favbtn_" style="display:none;"><span><span>已收藏</span></span></button>
          <{else}>
            <button type="button" class="btn btn-simple" rel="_favbtn_" data-gid="<{$goods.goods_id}>" style="display:none;"><span><span>收藏</span></span></button>
            <button type="button" class="btn btn-plane" rev="_favbtn_"><span><span>已收藏</span></span></button>
          <{/if}>
        <{/if}>
        
              	<!-- add这里是验证--未登录不显示价格-黄智坤06-20   -->
	<{if $check_login == "login"}>
	
	<!-- end这里是验证--未登录不显示价格-黄智坤06-20 -->
        <button type="button" class="btn btn-simple action-compare" data-compare='{type_id:"<{$goods.type_id}>",goods_id:"<{$goods.goods_id}>",img:"<{$goods.image_default_id|storager:'s'}>",name:"<{$goods.name|strip_tags}>",
        price:" <{if $goods.products.member_state == 1}>
               <{$goods.products.mlv_price|cur_odr}>
             <{else}>
               <{$goods.products.price|cur_odr}>
             <{/if}>"}'><span><span>对比</span></span></button> <!--by.wpn 2017/5/12-->
      	<!-- add这里是验证--未登录不显示价格-黄智坤06-20   -->
	<{/if}>
 	<!-- end这里是验证--未登录不显示价格-黄智坤06-20 -->	          
             
      </div>
    </div>
    <div class="goods-price">
      <ul>
              	<!-- add这里是验证--未登录不显示价格-黄智坤06-20   -->
	<{if $check_login == "login"}>
	
	<!-- end这里是验证--未登录不显示价格-黄智坤06-20 -->
          <!-- <li><label for="">销售价：</label> 改为供货价 -->
          <li><label for="">供货价：</label>
            <ins class="price">
            <!--@zeng 2017.4.20-->
              <{if $goods.products.member_state == 1}>
                <{if $goods.mlv_price1}>
                  <{$goods.mlv_price1|cur_odr}>
                <{else}><{if $goods.mlv_price2}>
                   <{$goods.mlv_price2|cur_odr}>
                <{else}>
                  <{$goods.products.mlv_price|cur_odr}>
                <{/if}><{/if}>
             <{else}>
                <{if $goods.price1}>
                  <{$goods.price1|cur_odr}>
                <{else}><{if $goods.price2}>
                  <{$goods.price2|cur_odr}>
                <{else}>
                  <{$goods.products.price|cur_odr}>
                <{/if}>  <{/if}>
             <{/if}>
            </ins>
          </li>



          <!-- <b><{$goods.products.product_id}></b> -->
          <!-- <li><label for="">会员折扣率：</label><ins class="price"><{$goods.products.dis_count|cur_odr}></ins></li> -->
          
          <{if $env.conf.b2c.site.show_mark_price == 'true'}>
          <!-- 市场价改为原价 -->
          <li><label for="">原价：</label><del class="price"><{$goods.products.mktprice|cur_odr}></del></li>
          <li><label for="">建议零售价：</label><{$goods.products.cost|cur_odr}></li>
          <!-- <{if $env.conf.b2c.site.save_price == '1'}>
          <li><label for="">节省：</label><span><{$goods.products.mktprice-$goods.products.price|cur_odr}></span></li> -->
          <{elseif $env.conf.b2c.site.save_price == '2'}>
          <li><label for="">优惠：</label><span><{$goods.products.price/$goods.products.mktprice*100|number:'2'}>%</span></li>
          <{elseif $env.conf.b2c.site.save_price == '3'}>
          <li><label for="">折扣：</label><span><{$goods.products.price/$goods.products.mktprice*100|number:'1'}><{t}>折<{/t}></span></li>
          <{/if}>
          <{/if}>
                        	<!-- add这里是验证--未登录不显示价格-黄智坤06-20   -->
	<{/if}>
 	<!-- end这里是验证--未登录不显示价格-黄智坤06-20 -->	    
         <!--add hzk 06-02 provide promotion_data for lxs-->
         <div style="height: 25px; position: relative;top: 25px;width: 320px;line-height: 25px;">

          <!-- 订单促销名称 -->
          <{foreach from=$goods.products.current_promotion.order item=promotion}>
            <div class="cuxiao">
              <em class="label-alert"><{$promotion.name}></em>
            </div> 
    	    <{/foreach}>
          <!-- 商品促销名称 -->
          <{foreach from=$goods.products.current_promotion.goods item=grule}>
            <div class="cuxiao">
             <{if $grule.use == 'true'}>
              <em class="label-alert"><{$grule.name}></em>
             <{/if}>
            </div> 
          <{/foreach}>

    	 <div>
 <!--    	 .label-alert {
} -->
    	 <!-- add end -->
    	 
      </ul>
    </div>
    <div class="goods-info">
      <!--预售商品的显示判断-->

      

      <{if !isset($goods.prepare)}>
        <{if $goods.products.promotion_type_name }>
        <h3 class="goods-name"><a <{if $opentype eq 'new_page'}>target="_blank"<{/if}> href="<{link app=starbuy ctl=site_team act=index arg0=$goods.products.product_id arg1=$goods.products.promotion_type_id}>"><{$goods.name}></a>
        <{else}>
        <h3 class="goods-name"><a <{if $opentype eq 'new_page'}>target="_blank"<{/if}> href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><{$goods.name}></a>
        <{/if}>
        <{else}>
        <h3 class="goods-name"><a <{if $opentype eq 'new_page'}>target="_blank"<{/if}> href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><{$goods.name}></a>&nbsp;<span style="color:#fff;background:red;font-weight:bold;">预售</span>
      <{/if}>
    
       <!-- 商品要货规格 begin-->
            <p style="margin-top: 3px;">
                <p class="text-tag-<{$tags.params.pic_loc}>" style="line-height: 20px;">要货规格：<{$goods.good_standard}></p>
                <p class="text-tag-<{$tags.params.pic_loc}>" style="line-height: 20px;color: #bbb">货号编码：<{$goods.bn}></p>
                <p class="text-tag-<{$tags.params.pic_loc}>" style="line-height: 20px;color: #bbb">商品条形码：<{$goods.keyword}></p>
            </p>

    <!-- 商品要货规格 end-->
  </h3>

  <!-- 商品标签 begin-->
  <p>
    <{if $goods.tags && $gallery_display_tag_goods == 'true'}>
      <{foreach from=$goods.tags item=tags}>
        <{if $tags.params.tag_showOnIndex == 'on'}>
        <!-- 选择显示到前台 -->
        <{if $goods.products.current_promotion.goods}>
        <{foreach from=$goods.products.current_promotion.goods item=grule}>
        <{if $grule.use == 'true'}>
        <span class="text-tag-<{$tags.params.pic_loc}>" style="display:inline-block;margin-right:20px;background:#CC0001;color:#fff;height:auto;opacity:<{$tags.params.tag_opacity / 100}>;filter:alpha(opacity=<{$tags.params.tag_opacity}>)"><{$tags.tag_name}></span>
        <{else}>
        <span class="text-tag-<{$tags.params.pic_loc}>" style="display:inline-block;margin-right:20px;background:#CC0001;color:#fff;height:auto;opacity:<{$tags.params.tag_opacity / 100}>;filter:alpha(opacity=<{$tags.params.tag_opacity}>)">正常</span>
        <{/if}>
        <{/foreach}>
        <{else}>
        <span class="text-tag-<{$tags.params.pic_loc}>" style="display:inline-block;margin-right:20px;background:#CC0001;color:#fff;height:auto;opacity:<{$tags.params.tag_opacity / 100}>;filter:alpha(opacity=<{$tags.params.tag_opacity}>)"><{$tags.tag_name}></span>
        <{/if}>
        <{else}>
        <!-- 没有选择显示到前台 -->
        <span class="text-tag-<{$tags.params.pic_loc}>" style="margin-right:20px;background:#CC0001;color:#fff;height:auto;opacity:<{$tags.params.tag_opacity / 100}>;filter:alpha(opacity=<{$tags.params.tag_opacity}>)">正常</span>
        <{/if}>
      <{/foreach}>
    <{else}>
      <span class="text-tag-<{$tags.params.pic_loc}>" style="margin-right:20px;background:#CC0001;color:#fff;height:auto;">正常</span>
    <{/if}>
    <!-- 商品标签 end-->
  </p>

      <div class="goods-desc"><{$goods.brief}></div>
      <div class="goods-comment">
        <{if $point_status == 'on'}>
        <{if $goods.comments_count > 0}>
        <em class="stars stars-<{$goods.goods_point.avg_num*10}>">
          <span class="below"><i class="icon star">&#x2f;</i><i class="icon star">&#x2f;</i><i class="icon star">&#x2f;</i><i class="icon star">&#x2f;</i><i class="icon star">&#x2f;</i></span><span class="above"><i class="icon star">&#x2e;</i><i class="icon star">&#x2e;</i><i class="icon star">&#x2e;</i><i class="icon star">&#x2e;</i><i class="icon star">&#x2e;</i></span>
        </em>
        <{if $commentListListnum=='true'}>
        <a href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>#product_comment"><b><{$goods.comments_count}></b><{t}>条评论<{/t}></a>
        <{/if}>
        <{else}>
        <{if $commentListListnum=='true'}>
        <{t}>暂无评论<{/t}>
        <{/if}>
        <{/if}>
        <{/if}>
      </div>
      <div class="promotion-tags">
      <{if !$goods.products.promotion_type_name && $goods.promotion_tags && $env.conf.b2c.gallery.display.promotion == 'true'}>
        <{foreach from=$goods.promotion_tags item=pTag}>
        <span class="tag"><{$pTag.tag_name}></span>
        <{/foreach}>
    <{/if}>

    <{if $goods.products.promotion_type_name }>
    <span class="tag"><{$goods.products.promotion_type_name}></span>
    <{/if}>
      </div>
  </div>
    </li>
    <{/foreach}>
  </ul>
</div>
<{pagers data=$pager}>
